# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname='perl-sort-naturally'
pkgver=1.03
pkgrel=8
pkgdesc="sort lexically, but sort numeral parts numerically"
arch=('any')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl')
url='https://search.cpan.org/dist/Sort-Naturally'
source=("https://search.cpan.org/CPAN/authors/id/B/BI/BINGOS/Sort-Naturally-$pkgver.tar.gz")
md5sums=('fef2e36d1b1ea23ee79ec68b5872453f')

build() {
  cd "$srcdir"/Sort-Naturally-$pkgver
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
  make test
}

package() {
  cd "$srcdir"/Sort-Naturally-$pkgver
  make install DESTDIR="$pkgdir"
  find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
}
